//
//  MoviePlayController.m
//  Eyes(StoryBord)
//
//  Created by Jason on 16/3/1.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "MoviePlayController.h"
#import "AppDelegate.h"

@interface MoviePlayController ()<MoviePlayViewDelegate>

@end

@implementation MoviePlayController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    NSURL *url = [NSURL URLWithString:_model.playUrl];
    MoviePlayView *movieView = [[MoviePlayView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen].bounds.size.width) URL:url];
    movieView.delegate = self;
    movieView.model = _model;
    [self.view addSubview:movieView];
    
}
// 播放界面的代理方法
- (void)goBack {
    AppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
    appDelegate.isFlip = NO;
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
